home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 May / EnigmA AMIGA RUN 18 (1997)(G.R. Edizioni)(IT)[!][issue 1997-05][EAR-CD II].iso / earcd / biz / swood / fw_font.lha / FW_Font / FontLook-Auto.fwrexx < prev    next >
Text File  |  1997-02-16  |  5KB  |  229 lines

  1. /* Optimized with RexxOpt 1.7 */
  2.  
  3. R='0A'X
  4. Address='FinalW'
  5. Options results
  6. STATUS PORTNAME
  7. FW=result
  8. address=FW
  9. SIGNAL ON BREAK_C
  10. 'ShowMessage 2 0 "FontLook - Auto V2.70" "für Font-Verzeichnisse..." "(©) Heiko Schröder - 20.01.97" ":-)" "Ok" "(-:"'
  11. 'ShowMessage 1 1 "A C H T U N G !" "Das Makro benötigt ein leeres Dokument." "Ihr jetziges Dokument wird gelöscht!" "Ja" "Abbruch" ""'
  12. if result=2 then call BREAK_C
  13. Cleardoc Force
  14. 'ShowMessage 2 0 "Codes oder Layout" "" "" "Codes" "Layout" ""'
  15. cl=result
  16. 'ShowMessage 2 0 "Wie soll die" "Bilschirmausgabe erfolgen?" "" "Normal" "Speed" ""'
  17. ba=result
  18. Temp="ram:fonts"
  19. if ~show('L',"rexxreqtools.library") then;do
  20. if ~addlib('rexxreqtools.library',0,-30,0) then;do
  21. 'ShowMessage 1 1 "Fehler...." "Benötige RexxReqTools.library" " A B B R U C H ! !" "Okay" "" ""'
  22. exit
  23. end
  24. end
  25. dir=rtfilerequest("FWFonts/SWOLFonts/",,"Verzeichnis auswählen...","»·Start·«","rt_pubscrname=FinalWriterPubScreen rtfi_flags = freqf_nofiles")
  26. if dir="" then;do
  27. 'ShowMessage 1 1 "Kein Verzeichnis ausgewählt!" "   A B B R U C H ! !" "" "Okay" "" ""'
  28. exit
  29. end
  30. dir=d2c(34)||dir||d2c(34)
  31. address command 'list ' dir||' to=' Temp||' files lformat "%s%s"'
  32. If OPEN('file',Temp,"R") then
  33. If Seek("file",0,"E")=0 then;do
  34. 'ShowMessage 1 1 "Verzeichnis ist leer" " A B B R U C H ! !" "" "Okay" "" ""'
  35. address "REXX"
  36. close("file")
  37. EXIT
  38. end
  39. address "REXX"
  40. close("file")
  41. address command 'sort ' Temp Temp
  42. OPEN('file',Temp,"R")
  43. address(FW)
  44. 'ShowMessage 1 0 "Benötigen Sie Locher-Marken?" "" "" "Ja" "Nein" ""'
  45. lm=result
  46. 'ShowMessage 1 0 "Wie geht es weiter?" "" "" "Speichern" "Speichern & Drucken" "Drucken"'
  47. wgw=result
  48. DO WHILE 1
  49. FontName=ReadLn('file')
  50. IF EOF('file') THEN;do
  51. address "REXX"
  52. close('file')
  53. call Ende
  54. End
  55. IF ba=2 THEN;DO
  56. status WINDOW
  57. parse VAR result links oben width height minwidth minheight maxwidth maxheight
  58. sizewindow minwidth minheight
  59. End
  60. GetDocItemPrefs Decimal
  61. Punkt=Result
  62. If Punkt="Comma" then DocItemPrefs Decimal Period
  63. TextTool
  64. Font FontName
  65. a=RC
  66. If a=0 then;do
  67. Type d2c(32)
  68. BackSpace
  69. status FontPath
  70. FullFontName=result
  71. pos=LASTPOS('/',FullFontName)
  72. IF (pos~=0) THEN
  73. FontName=RIGHT(FullFontName,LENGTH(FullFontName)-pos)
  74. ELSE;DO
  75. pos=LASTPOS(':',FullFontName)
  76. IF (pos~=0) THEN
  77. FontName=Right(FullFontName,LENGTH(FullFontName)-pos)
  78. ELSE
  79. EXIT
  80. END
  81. IF ba=2 THEN View 20
  82. Pagesetup Pagetype A4 Orient Tall Pages RightOnly Top 0 Bottom 2.54 Left 0 Right 0
  83. SectionSetup Top 2.54 Bottom 2.54 Inside 2 Outside 1
  84. GraphicTool
  85. LinePrefs LineWt .5
  86. DrawLine 1 2 3.5 20 3.5
  87. DrawLine 1 2 26 20 26
  88. If lm=1 then DrawLine 1 .5 14.85 1 14.85
  89. TextTool
  90. If cl=1 then;do
  91. Do i=0 to 13
  92. SetTab i*1.3+0.8 Right
  93. End
  94. NameFont="FWDocs/Codes-"||FontName
  95. Justify Center
  96. Font Softsans
  97. FontSize 18
  98. Type FontName||R||R
  99. a=0
  100. DO w=1 to 15
  101. Font Softsans
  102. FontSize 8
  103. DO x=a+33 to a+46
  104. Type d2c(9)||x|| d2c(32)|| d2c(x)
  105. END
  106. Type R
  107. Font FontName
  108. FontSize 24
  109. DO x=a+33 to a+46
  110. Type d2c(9)
  111. Type d2c(x)
  112. END
  113. Type R
  114. a=a+14
  115. END
  116. Font Softsans
  117. FontSize 8
  118. DO x=a+33 to a+45
  119. Type d2c(9)||x|| d2c(32)|| d2c(x)
  120. END
  121. Type d2c(9)||R
  122. Font FontName
  123. FontSize 24
  124. DO x=a+33 to a+45
  125. Type d2c(9)
  126. Type d2c(x)
  127. END
  128. Type d2c(9)||R
  129. FontSize 12
  130. Type d2c(9)||R
  131. Font Softsans
  132. FontSize 8
  133. Justify Right
  134. Type Date(E)" - "FullFontName
  135. END
  136. If cl=2 then;do
  137. Justify Center
  138. NameFont="FWDocs/Layout-"||FontName
  139. Font Softsans
  140. FontSize 18
  141. Type FontName||R
  142. Justify Left
  143. Font FontName
  144. FontSize 8
  145. Type R||"This is 8-point type - not easy to read!"||R
  146. FontSize 9
  147. Type "9-Point type is about the smallest readable size."||R
  148. FontSize 10
  149. Type "With 10-point type, we have a normal text size."||R
  150. FontSize 12
  151. Type "With some Fonts, 12-point type is easier to read."||R
  152. FontSize 14
  153. Type "14-point type is good for subheadings."||R
  154. FontSize 16
  155. Type "For larger subheadings, try 16-point type."||R
  156. FontSize 18
  157. Type "18-point type makes nice small headlines."||R
  158. FontSize 24
  159. Type "24-point type is for medium headlines."||R
  160. FontSize 36
  161. Type "36-point is for larger ones."||R
  162. FontSize 48
  163. Type "48-point almost shouts!"||R||R
  164. FontSize 12
  165. Font SoftSans
  166. Type "NORMAL"||R
  167. FontSize 10
  168. Font FontName
  169. Type "ABCDEFGHIJKLMNOPQRSTUVWXYZ"||R
  170. Type "abcdefghijklmnopqrstuvwxyz 1234567890 !@#$%^&*()-+=[]{}/:;,.?"||R
  171. Type "The quick brown fox jumps over the lazy dog. ÄÖÜäöüß"||R||R||R
  172. Font SoftSans
  173. Type "ERWEITERTER SCHRIFTCODE"||R
  174. FontSize 10
  175. Font FontName
  176. j=0
  177. Do i=1 to 4
  178. Do k=128+j to 159+j
  179. Type d2c(k)
  180. End
  181. Type R
  182. j=j+32
  183. End
  184. Status BodyTextHeight
  185. th=result
  186. FG=26.24-2.113-th
  187. FG=Trunc(FG*8/0.34)
  188. FontSize FG
  189. Type d2c(9)
  190. Font SoftSans
  191. FontSize 8
  192. Type R
  193. Justify Right
  194. Type Date(E)" - "FullFontName
  195. End
  196. call WH
  197. If wgw~=3 then
  198. Save NameFont
  199. If wgw=2 then
  200. Print
  201. If wgw=3 then
  202. Print
  203. Cleardoc force
  204. END
  205. else;do
  206. call WH
  207. 'ShowMessage 1 1 "FW kann diesen Font nicht anzeigen..." "Es ist kein FW typischer Font..." "" "Okay" "" ""'
  208. end
  209. END
  210. Ende:
  211. Address(FW)
  212. If cl=1 then 'ShowMessage 2 1 "Die Dokumente sind im FWDocs-Drawer" "zu finden. Erkennbar am «Codes-.....«" "Vielen Dank für die Benutzung." "@-`-" "Bitte" ":-))"'
  213. If cl=2 then 'ShowMessage 2 1 "Die Dokumente sind im FWDocs-Drawer" "zu finden. Erkennbar am «Layout-.....«" "Vielen Dank für die Benutzung." "@-`-" "Bitte" ":-))"'
  214. Address command "delete ram:fonts QUIET"
  215. EXIT
  216. BREAK_C:
  217. 'ShowMessage 1 1 "Makro-Abbruch..." "" "" "Ich weiß..." "" ""'
  218. call WH
  219. address "REXX"
  220. CLOSE("file")
  221. Address command "delete ram:fonts QUIET"
  222. EXIT
  223. WH:
  224. If ba=2 then;do
  225. View
  226. sizewindow width height
  227. End
  228. If Punkt="Comma" then DocItemPrefs DECIMAL Comma
  229. Return